package com.lhb.boyixue.user.mapper;

import com.lhb.boyixue.user.model.User;
import com.lhb.boyixue.user.model.setGradeAndTimeModel;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface UserMapper {
    @Insert("insert into user values (#{openid})")
    void addUser(String openid);
    @Select("select * from user where openid=#{openid}")
    User getUserByOpenid(String openid);
    @Update("update user set grade=#{grade},exam_time =#{examTime} where openid=#{openid}")
    int setGradeAndTime(setGradeAndTimeModel setGradeAndTimeModel);
}
